package com.party.core.model.notify;

import com.party.core.model.BaseModel;

import java.util.Date;

/**
 * 业务短信模板
 * Created by wei.li
 *
 * @date 2017/7/4 0004
 * @time 9:44
 */
public class TargetTemplate extends BaseModel {

    private static final long serialVersionUID = -257606948504068295L;

    //目标编号
    private String targetId;

    //模板内容
    private String template;

    //模板类型
    private Integer type;

    //机构编号
    private String initiatorId;

    // 发送时间
    private Date sendTime;

    // 短信可发送数量
    private Integer spareNum;

    //短信推送用户的ids
    private String memberIds;

    //用户类型--行知公社会员
    private Integer memberType;

    //积分类型Id
    private String ciTypeId;
    //积分项Id
    private String ciItemId;

    public String getMemberIds() {
        return memberIds;
    }

    public void setMemberIds(String memberIds) {
        this.memberIds = memberIds;
    }

    public Integer getMemberType() {
        return memberType;
    }

    public void setMemberType(Integer memberType) {
        this.memberType = memberType;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getInitiatorId() {
        return initiatorId;
    }

    public void setInitiatorId(String initiatorId) {
        this.initiatorId = initiatorId;
    }

    public Integer getSpareNum() {
        return spareNum;
    }

    public void setSpareNum(Integer spareNum) {
        this.spareNum = spareNum;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public String getCiTypeId() {
        return ciTypeId;
    }

    public void setCiTypeId(String ciTypeId) {
        this.ciTypeId = ciTypeId;
    }

    public String getCiItemId() {
        return ciItemId;
    }

    public void setCiItemId(String ciItemId) {
        this.ciItemId = ciItemId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TargetTemplate)) return false;
        if (!super.equals(o)) return false;

        TargetTemplate that = (TargetTemplate) o;

        if (targetId != null ? !targetId.equals(that.targetId) : that.targetId != null) return false;
        if (template != null ? !template.equals(that.template) : that.template != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (initiatorId != null ? !initiatorId.equals(that.initiatorId) : that.initiatorId != null) return false;
        if (sendTime != null ? !sendTime.equals(that.sendTime) : that.sendTime != null) return false;
        return spareNum != null ? spareNum.equals(that.spareNum) : that.spareNum == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (targetId != null ? targetId.hashCode() : 0);
        result = 31 * result + (template != null ? template.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (initiatorId != null ? initiatorId.hashCode() : 0);
        result = 31 * result + (sendTime != null ? sendTime.hashCode() : 0);
        result = 31 * result + (spareNum != null ? spareNum.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "TargetTemplate{" +
                "targetId='" + targetId + '\'' +
                ", template='" + template + '\'' +
                ", type=" + type +
                ", initiatorId='" + initiatorId + '\'' +
                ", sendTime=" + sendTime +
                ", spareNum=" + spareNum +
                '}';
    }
}
